//公共样式---合作伙伴图片引入
import{getPartners}from "./request.js";
import { lazyLoad } from "../utils/lazyLoad.js";


//获取页面合作伙伴的图片
var partnerImgs = document.querySelectorAll('.pinpai img')
console.log(partnerImgs);

async function partner(){
   let res3 = await getPartners();
   console.log(res3);
   let arr2 = [];
   res3.results.forEach(function(item){
    arr2.push(item.photo_detal.url);
  })
  partnerImgs.forEach(function(item,index){
    item.setAttribute("data-src",arr2[index])
  })
  
  lazyLoad(partnerImgs);
}
export {partner};
